package com.aspose.cells.b.a;

public class zc {
   public static byte[] a(int var0) {
      byte[] var1 = new byte[4];
      a(var1, 0, 4, (long)var0);
      return var1;
   }

   public static int a(byte[] var0, int var1) {
      return (int)a(var0, var1, 4);
   }

   public static byte[] a(short var0) {
      byte[] var1 = new byte[2];
      a(var1, 0, 2, (long)var0);
      return var1;
   }

   public static short b(byte[] var0, int var1) {
      return (short)((int)a(var0, var1, 2));
   }

   public static byte[] a(long var0) {
      byte[] var2 = new byte[8];
      a(var2, 0, 8, var0);
      return var2;
   }

   public static long c(byte[] var0, int var1) {
      return a(var0, var1, 8);
   }

   public static long d(byte[] var0, int var1) {
      int var2 = a(var0, var1);
      long var3;
      if (var2 < 0) {
         var3 = (long)var2 & 4294967295L;
      } else {
         var3 = (long)var2;
      }

      return var3;
   }

   public static int e(byte[] var0, int var1) {
      short var2 = b(var0, var1);
      int var3;
      if (var2 < 0) {
         var3 = var2 & '\uffff';
      } else {
         var3 = var2;
      }

      return var3;
   }

   public static byte[] a(double var0) {
      return a(Double.doubleToLongBits(var0));
   }

   public static double f(byte[] var0, int var1) {
      long var2 = c(var0, var1);
      return Double.longBitsToDouble(var2);
   }

   private static long a(byte[] var0, int var1, int var2) {
      long var3 = 0L;

      for(int var5 = var1 + var2 - 1; var5 >= var1; --var5) {
         var3 <<= 8;
         var3 |= (long)(var0[var5] & 255);
      }

      return var3;
   }

   private static void a(byte[] var0, int var1, int var2, long var3) {
      for(int var5 = var1; var5 < var2 + var1; ++var5) {
         var0[var5] = (byte)((int)(var3 & 255L));
         var3 >>= 8;
      }

   }
}
